import Vue from 'vue'
import Router from 'vue-router'

import Card from './views/Card.vue'
import Contacts from './views/Contacts.vue'
import Conversation from './views/Conversation.vue'
import Cred from './views/Cred.vue'
import Home from './views/Home.vue'
import Inbox from './views/Inbox.vue'
import Message from './views/Message.vue'
import Ring from './views/Ring.vue'
import Transport from './views/Transport.vue'
import Wallet from './views/Wallet.vue'

Vue.use(Router)

export default new Router({
    //mode: 'abstract',
    routes: [
        {
            path: '/',
            name: 'home',
            component: Home
        },
        {
            path: '/transport',
            name: 'transport',
            component: Transport
        },
        {
            path: '/contacts',
            name: 'contacts',
            component: Contacts,
        },
        {
            path: '/contacts/card/',
            name: 'card',
            props: true,
            component: Card,
        },
        {
            path: '/contacts/card/:fingerprint',
            name: 'card',
            props: true,
            component: Card,
        },
        {
            path: '/ring',
            name: 'ring',
            component: Ring,
        },
        {
            path: '/wallet',
            name: 'wallet',
            component: Wallet,
        },
        {
            path: '/wallet/cred/',
            name: 'cred',
            props: true,
            component: Cred,
        },
        {
            path: '/wallet/cred/:fingerprint',
            name: 'cred',
            props: true,
            component: Cred,
        },
        {
            path: '/inbox',
            name: 'inbox',
            component: Inbox,
            meta: { requiresAuth: true },
        },
        {
            path: '/inbox/conversation/:id',
            name: 'conversation',
            props: true,
            component: Conversation,
        },
        {
            path: '/inbox/conversation/message/:id',
            name: 'message',
            props: true,
            component: Message
        },
    ]
})
